#include "widget.h"
#include "ui_widget.h"
#include <QFont>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    ui->label->setText("这是一段文本");
    QFont font;
    font.setFamily("微软雅黑");
    font.setBold(true);
    font.setItalic(true);
    font.setUnderline(true);
    font.setStrikeOut(true);
    ui->label->setFont(font);

    ui->label->setToolTip("这是一个标签");
    ui->label->setToolTipDuration(3000);

    ui->lineEdit->setFocusPolicy(Qt::StrongFocus);
    ui->lineEdit_2->setFocusPolicy(Qt::NoFocus);
    ui->lineEdit_3->setFocusPolicy(Qt::TabFocus);
    ui->lineEdit_4->setFocusPolicy(Qt::ClickFocus);
}

Widget::~Widget()
{
    delete ui;
}

